#include<iostream>
int main()
{
	int Sn,a,n,x,i=2;
	a=2;
	Sn=a;
	x=a;
	scanf("%d",&n);
	while(i<=n)
	{
		x=a+x*10;
		Sn=Sn+x;
		i++;
	}
	printf("%d %d\n",Sn,x);
	system("pause");
	return 0;
}
